<template>
  <view class="entry-reject">
    <image src="/static/images/reject.png" class="reject-img" />
    <view class="status-text">很抱歉，您的入驻申请未通过审核</view>
    <view class="reason">原因：{{ reason }}</view>
    <button @tap="reApply" type="primary">重新申请</button>
  </view>
</template>

<script setup>
import { ref } from 'vue'
import { onLoad } from '@dcloudio/uni-app'


const reason = ref('')

onLoad((options) => {
  reason.value = decodeURIComponent(options.reason || '')
})

function reApply() {
  uni.redirectTo({ url: `/pages/entry/apply?resubmit=1&reason=${encodeURIComponent(reason.value)}` })
}
</script>

<style scoped>
.entry-reject {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  padding: 40rpx 0;
}
.reject-img {
  width: 200rpx;
  height: 200rpx;
  margin-bottom: 32rpx;
}
.status-text {
  font-size: 32rpx;
  color: #d9534f;
  margin-bottom: 16rpx;
}
.reason {
  font-size: 28rpx;
  color: #888;
  margin-bottom: 32rpx;
}
button {
  width: 60%;
}
</style>